using System;
using System.Data;

using EntLibEC.Cmn;
using EntLibEC.Info.Basic;
using EntLibEC.Dac;
using EntLibEC.Dac.Basic;
using EntLibEC.Biz;

namespace EntLibEC.Biz.Basic
{
	/// <summary>
	/// Summary description for EmailManager.
	/// </summary>
	public class EmailManager
	{
		public EmailManager()
		{
			//
			// TODO: Add constructor logic here
			//
		}
		private static EmailManager _instance;
		public static EmailManager GetInstance()
		{
			if ( _instance == null )
			{
				_instance = new EmailManager();
			}
			return _instance;
		}

		private void map(EmailInfo oParam,DataRow tempdr)
		{
			oParam.SysNo = Util.TrimIntNull(tempdr["SysNo"]);
			oParam.MailAddress = Util.TrimNull(tempdr["MailAddress"]);
			oParam.MailSubject = Util.TrimNull(tempdr["MailSubject"]);
			oParam.MailBody = Util.TrimNull(tempdr["MailBody"]);
			oParam.Status = Util.TrimIntNull(tempdr["Status"]);
		}

		public void InsertEmail(EmailInfo oParam)
		{
			new EmailDac().InsertEmail(oParam);
		}
	}
}
